<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        html,
        body {
            padding: 0;
            margin: 0;
        }

        .box {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 700px;
            height: 400px;
            /* border: 1px solid #888; */
        }

        .header h1 {
            text-align: center;
            font-size: 30px;
            font-weight: 700;
            line-height: 10px;
            color: rgba(36, 33, 33, 0.822);
        }

        .nav {
            padding: 0px 16px;
        }

        .content {
            height: 260px;
            padding: 20px 10px;
            box-sizing: border-box;
        }

        .content div {
            line-height: 60px;
            color: rgba(36, 33, 33, 0.822);
        }

        .border1 {
            line-height: 18px;
            display: inline-block;
            width: 300px;
            border-bottom: 1px solid rgba(36, 33, 33, 0.822);
        }

        hr {
            margin: 1px;

        }

        .footer {
            padding: 0px 16px;
            line-height: 34px;
        }
    </style>
</head>

<body>
    <div class="box1">
        <div class="box">
            <div class="header">
                <h1>收 款 收 据
                </h1>
                <div style="width:154px;margin:0 auto">
                    <hr>
                    <hr>
                </div>

            </div>
            <div class="nav">
                <span>开票日期: <b class="time" style="font-weight: 200;" id="time"><?php echo $time;?></b></span>
                <span style="float: right;margin-right: 30px;">编码:
                    <b style="color: red;">20041008</b>
                </span>
            </div>

            <div class="content">
                <div style="padding: 24px 40px;border: 1px solid ; color: rgba(36, 33, 33, 0.822)">
                    <div>交款人 <span class="border1"  id="truename"><?php echo $pname;?>(<?php echo $organization;?>)</span></div>
                    <div>人民币(大写) <span class="border1"  id="rmb-dx"><?php echo $dxmoney;?></span>
                        <span>¥</span>
                        <span
                            style="display:inline-block;width:120px;border-bottom: 1px solid rgba(36, 33, 33, 0.822);line-height: 18px;"  id="rmb-xx"><?php echo $money;?></span>
                    </div>
                    <div>收款事由 <span class="border1" id="time"> 会费</span></div>
                </div>
            </div>
            <div class="footer">
                <span>单位盖章: </span>
                <span style="float: right;margin-right: 30px;">开票人: 
                    <select name="kpr" id="kpr">
                        <option value="应" selected>应</option>
                        <option value="齐">齐</option>
                    </select>
                </span>
            </div>
            <div class="button-footer">
                <button type="button" class="btn btn-primary" style="float: right;" onclick="doPrint()">确定</button>
            </div>
        </div>
    </div>
</body>
<script src="/static/js/jquery.min.js"></script>
<script>
    // 获取当前时间
    // (function name(params) {
    //     let time = new Date()
    //     let y = time.getFullYear()
    //     let m = time.getMonth()
    //     let d = time.getDate()
    //     let notTime = y + '/' + m + '/' + d
    //     document.querySelector('.time').innerText = notTime
    // })()

    function doPrint() {
        var  time = $("#time").text();
        var  truename = $("#truename").text();
        var  rmbDx = $("#rmb-dx").text();
        var  rmbXx = $("#rmb-xx").text();
        var  kpr = $("#kpr").val();
       
        window.location.href = '/admin/index/receipt?time='+time+'&truename='+truename+'&rmbDx='+rmbDx+'&rmbXx='+rmbXx+'&kpr='+kpr;
        // window.open('/index/index/receipt?time='+time+'&truename='+truename+'&rmbDx='+rmbDx+'&rmbXx='+rmbXx+'&kpr='+kpr);
    }
</script>

</html>